package com.hongxun.modules.api.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.hongxun.modules.api.dao.BDataDictionaryDao;
import com.hongxun.modules.api.entity.BDataDictionaryEntity;
import com.hongxun.modules.api.service.BDataDictionaryService;



@Service("bDataDictionaryService")
public class BDataDictionaryServiceImpl implements BDataDictionaryService {
	@Autowired
	private BDataDictionaryDao bDataDictionaryDao;
	
	@Override
	public BDataDictionaryEntity queryObject(String guid){
		return bDataDictionaryDao.queryObject(guid);
	}
	
	@Override
	public List<BDataDictionaryEntity> queryList(Map<String, Object> map){
		return bDataDictionaryDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return bDataDictionaryDao.queryTotal(map);
	}
	
	@Override
	public void save(BDataDictionaryEntity bDataDictionary){
		bDataDictionary.setGuid(UUID.randomUUID().toString());
		bDataDictionaryDao.save(bDataDictionary);
	}
	@Override
	public String selectvaluebykey(String d_code,String d_key){
		return bDataDictionaryDao.selectvaluebykey(d_code,d_key);
	}

	@Override
	public void update(BDataDictionaryEntity bDataDictionary){
		bDataDictionaryDao.update(bDataDictionary);
	}
	
	@Override
	public void delete(String guid){
		bDataDictionaryDao.delete(guid);
	}
	
	@Override
	public void deleteBatch(String[] guids){
		bDataDictionaryDao.deleteBatch(guids);
	}
	
}
